﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/PollMaster.Master" Inherits="System.Web.Mvc.ViewPage<GACFFP.User>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Edit User</h2>

    <div class="formWrapper">
     <form id="EditUserForm" runat="server" action="UpdateUser" method="post">

   <table cellpadding="2" cellspacing="0" border="0" width="100%" class="cellborder">
   <tr>
    <td align="right"><span class="formlabel">User Name</span></td>
    <td align="left"><input type="text" name="userName" id="userName" value="<%= Model.userName%>" /></td>
   </tr>
      <tr>
    <td align="right"><span class="formlabel">User Role</span></td>
    <td align="left">
            <select name="role" id="role">
              <% foreach (GACFFP.Role r in (List<GACFFP.Role>)ViewData["RolesList"]) 
               {
                 %>
                 <option value="<%= r.Role1 %>"

                 <%
                     
                 if (r.Role1 == Model.role)
                 {
                    Response.Write("Selected='true'");
                 }              
                      %>

              
              

              
              ><%= r.Role1 %></option>


              <% }%>
            </select>
     </td>
   </tr>
   <tr>
    <td align="right"></td>
    <td align="left"><input type="submit" value="update user" /></td>
   </tr>

     <tr>
    <td align="right"></td>
    <td align="left">    <br />
    <a href="updatepassword?user=<%=Model.userName %>" >Update Password</a></td>
   </tr>

   </table>     

    </form>
    </div>



</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
</asp:Content>
